package com.zan.rocketmqbootconsumer.listener;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author Zan
 * @Create 2024/8/30 10:24
 * @ClassName: DC6
 * @Description : TODO 请用一句话描述该类的功能
 */
@Component
@RocketMQMessageListener(
        topic = "modelTopic",
        consumerGroup = "model-consumer-group-b",
        messageModel = MessageModel.BROADCASTING // 广播模式
)
public class DC6 implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("我是model-consumer-group-b这个组的第三个消费者：" + message);
    }
}
